<template>
    <scroll class="item-list">
        <h1>我是购物车列表</h1>
        <cart-list-item v-for="(item,index) in setcartList"
        :key="index" :product="item"></cart-list-item>

    </scroll>
</template>
<script>
import Scroll from 'components/common/scroll/Scroll'
import CartListItem from './CartListItem'

// 引入vuex的功能，将vuex的getters里面属性转化成组件内的计算属性
    import {mapGetters} from 'vuex'

    export default {
        name:'CartList',
        components:{
            Scroll,
            CartListItem
        },
        computed: {
            ...mapGetters(['setcartList'])
        }
    }
</script>
<style scope>
  .item-list {
    height: calc(100vh - 93px - 40px);
    overflow: hidden;
  }
</style>